package com.lucene.blog.db.service.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.lucene.blog.bean.Link;
import com.lucene.blog.db.mapper.LinkMapper;
import com.lucene.blog.db.service.LinkService;

@Service("linkService")
public class LinkServiceImpl implements LinkService {

	@Resource
	private LinkMapper linkMapper;
	
	public List<Link> getLinkData() throws SQLException {
		return linkMapper.getLinkData();
	}

	public List<Link> getLinkDataList(Map<String, Object> map) throws SQLException {
		return linkMapper.getLinkDataList(map);
	}

	public Long getTotal(Map<String, Object> map) throws SQLException {
		return linkMapper.getTotal(map);
	}

	public Integer addLink(Link link) throws SQLException {
		return linkMapper.addLink(link);
	}

	public Integer updateLink(Link link) throws SQLException {
		return linkMapper.updateLink(link);
	}

	public Integer deleteLinkById(Integer id) throws SQLException {
		return linkMapper.deleteLinkById(id);
	}

}
